home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
MONITOR
/
TOPOGRAF.ARJ
/
TOPOGRAF.DOC
< prev
next >
Wrap
Text File
|
1992-03-21
|
4KB
|
63 lines
Instructions and Background:
-----------------------------
Recently, a set of files called "TOPOx.ZIP" were uploaded to EXEC-PC.
These files contain topographic information about the United States.
This means that they contain feet-above-sea-level altitudes for
thousands of points across the U.S. Although the uploader promised to
upload the entire U.S., only the eastern half of the country was
uploaded and no description or explanation of the file contents ever
appeared. I figured out what the contents of the files represented and
wrote a couple of programs to display those contents graphically in both
VGA (320 pixels by 200 pixels in 256 colors) and an oddball SuperVGA mode
(360 pixels by 480 pixels in 256 colors). Here are those programs,
along with a sample of the topographic data contained in the
"TOPOx.ZIP" files. If nothing else, they make pretty screen displays.
To run them, unZIP "TOPOGRAF.ZIP" into a sub-directory, then type
"TOPOGRAF" for VGA, or "TOPOSVGA" for the higher resolution. The area
displayed will be a section of the southern coast of the U.S., and a
little bit of the Gulf of Mexico. The colors don't really have any
meaning, except that sea-level will be black, and all points with the
same altitude will be the same color. Be prepared: there are thousands
of pieces of data being processed to produce this display. If possible,
use a RAM disk or disk-cache to contain the data-files, since this is
about the only way to speed the process up. Note that I have chosen to
display the data at the maximum possible resolution (one altitude-value
per display-pixel). This means that it takes more than one data-file to
create a full-screen display. For VGA, 6 data-files are required, and
for SVGA it takes 12.
If you decide to down-load the "TOPOx.ZIP" files (which are VERY large),
you can display any area contained in them using the same programs. If
no file-name is included on the command-line, the programs default to
reading the sample data-files included here. If you want, though, you
can start the programs with the command:
TOPOGRAF (or TOPOSVGA) <Input File Name>
Replace <Input File Name> with the name of one of the files contained in
the "TOPOx.ZIP" file you down-loaded and unZIPped. The names of these
files follow the following pattern:
<Degrees North Longitude><Degrees West Latitude>.30s
Longitude must be a 2-digit number and latitude must be 3-digits.
For example, New Orleans has a north longitude of about 30 and a west
latitude of about 90, so the data-file with containing New Orleans
would be named "30090.30s". The programs interpret the command-line
file as being the south-west-most area of the display. For example, if
you wanted to display the area from 30 degrees west longitude, 89 degrees
north latitude to 31 degrees west longitude, 91 degrees north latitude
in VGA resolution (which is the default for "TOPOGRAF.EXE"), you could
enter the command "TOPOGRAF 30091.30s".
The programs are written in QuickBASIC. The SVGA version uses an add-on
function library called "GRAFWIZ" which allows extended VGA mode
programming. The way I figured out the file structure of the
topographic data-files was to display their contents to the screen and
see that they consisted of numbers in the range of 0 to about 10,000.
This indicated to me that these numbers represented MSL (mean sea level)
altitudes. By figuring out that there were 14,400 numbers in each file,
I deduced that these numbers represented an area of 120 by 120 altitude
points (120X120=14,400).